<%@ page language="java" contentType="text/html; charset=UTF-8"
	pageEncoding="UTF-8"%>
<%@ taglib prefix="s" uri="/struts-tags"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<script language="javascript" type="text/javascript"
	src="${rootPath}/My97DatePicker/WdatePicker.js"></script>
<script type='text/javascript' src='${rootPath}/dwr/engine.js'></script>
<script type='text/javascript'
	src='${rootPath}/dwr/interface/DwrTest.js'></script>
<script type="text/javascript"
			src='${rootPath}/js/jquery-1.9.1.js'></script>
<script type="text/javascript">

	function testDWR() {
		DwrTest.getDate(function(data) {
			alert(data);
		});
		DwrTest.getDBDate(function(data) {
			alert("db:"+data);
		});
	}
	
	
	

function aa(){
 var phone=$("#phone").val();
 return "phone="+phone;
}
$(document).ready(function(){
	$("#btn").click(function(){
   		$.ajax({
					type: 'POST',
					url: '<s:url value="/sendVerificationCode.action" />',
					data: aa(),
					dataType:"json",
					success: function(data){
					   
						$("#testDIV").html(data.codeDesc);
					}
		});

	});
});

	

</script>

<title>Insert title here</title>
</head>
<body>
	<button value="DWR调用测试" onclick="testDWR();">DWR调用测试</button>
	<hr>
	${hello}
	<hr>
	<s:property value="#hello" />
	<hr>
	<s:property value="#locale" />
	<hr>
	<s:property value="#com.opensymphony.xwork2.ActionContext.locale" />
	<hr>
	<s:property value="#context.locale" />
	<hr>
	<s:property value="#com.opensymphony.xwork2.ActionContext.name" />
	<hr>
	<s:property value="#context.name" />
	<s:property value="#request['struts.view_uri']" />
	<hr>
	<input class="Wdate" type="text" name="appdate" id="appdate" size="30"
		maxlength="50"
		onFocus="WdatePicker({dateFmt:'yyyy-MM-dd',readOnly:true,wdate:true,errDealMode:0});"
		value="" />
			<hr>
    <input type="text" id="phone" name="phone" value=""/>
   	<hr>
    <input type="text" id="verCode" name="verCode" value=""/>
    <hr>
    <button  id="btn" value="获取验证码">获取验证码</button>
    <hr>
    <div id="testDIV"></div>
    <button value="DWR调用测试" onclick="testDWR();">DWR调用测试</button>
	<hr>

	
	
</body>
</html>
